import { request } from '@/utils/request.js';

const url = '/adminapi/test/';

/**
 * 列表
 */
export function apiList(params) {
  return request({
    url: `${url}list`,
    method: 'get',
    params: params,
  });
}

/**
 * 详情
 */
export function apiInfo(params) {
  return request({
    url: `${url}info`,
    method: 'get',
    params: params,
  });
}

/**
 * 保存
 */
export function apiSave(data) {
  return request({
    url: `${url}save`,
    method: 'post',
    data: data,
  });
}

/**
 * 删除
 */
export function apiDel(params) {
  return request({
    url: `${url}delete`,
    method: 'get',
    params: params,
  });
}

/**
 * 导入
 */
export function apiImport(data) {
  return request({
    url: `${url}import`,
    method: 'post',
    data: data,
    headers: {'Content-Type': 'multipart/form-data'},
  });
}

/**
 * 批量保存
 */
export function apiSaveList(data) {
  return request({
    url: `${url}saveList`,
    method: 'post',
    data: data,
  });
}

/**
 * 导出
 */
export function apiExport(data) {
  return request({
    url: `${url}export`,
    method: 'post',
    data: data,
  });
}
